package top.hiai.service;

import com.jfinal.plugin.activerecord.Page;

import top.hiai.model.Message;


/**
* @Author www.hiai.top
* @Email  goodsking@163.com
* @Message 更多资源尽在www.hiai.top,开发者：黄康权
* @Introduction 类的介绍
*/

public class MessageService {
	
	private Message dao = new Message().dao();
	
	/**
	 * 根据用户登录的ID遍历该用户的系统消息
	 * @param pageNumber
	 * @param pageSize
	 * @return
	 */
	public Page<Message> paginateGetMessage(int pageNumber, int pageSize,int uid) {
		return dao.paginate(pageNumber, pageSize, "select * ", " "
				+ "from t_message "
				+ "where t_message.user_id = '"+uid+"' order by t_message.publish_date DESC");
	}

}
